package com.heima.apis.apuser;

import com.heima.model.user.dtos.ApUserAuthPageReqDTO;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.pojos.ApUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author:Dikk
 * @create: 2023-08-02 09:12
 * @Description: IApUserClient
 */
@FeignClient(value = "leadnews-user")
@Component
public interface IApUserClient {

    @PostMapping("/api/v1/apuser/auth/list")
    ResponseResult authList(@RequestBody ApUserAuthPageReqDTO apUserAuthPageReqDTO);

    @PostMapping("/api/v1/apuser/auth/auth")
    ResponseResult authPass(@RequestBody ApUserAuthPageReqDTO apUserAuthPageReqDTO);

    @GetMapping("/api/v1/apuser/{id}")
    ApUser findUserById(@PathVariable Integer id);
}
